package com.gec.teams.wechat.pojo.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.lang.annotation.Documented;
import java.util.Date;

/**
 * 功能：
 * 作者：YumTea
 * 日期：2024/6/25 9:23
 */
@Data
@Document(collection = "message")
public class MessageEntity implements Serializable {
    @Id
    private String _id;

    @Indexed(unique = true)
    private String uuid;


    //设置索引
    @Indexed
    private Integer senderId;

    //发送人的头像
    private String senderPhoto="https://c-ssl.duitang.com/uploads/item/201810/18/20181018163608_kwrle.jpg";

    private String senderName;

    private String msg;

    @Indexed
    private Date sendTime;
}
